package com.baike.feign;

import com.baike.data.Result;
import com.baike.em.ConstantEnum;
import com.baike.entity.TbStudentHave;
import com.baike.feign.fallback.LessonServiceFeignBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "baike-education-lesson-service",fallback = LessonServiceFeignBack.class)//服务名,找到项目
public interface LessonServiceFeign {

    //学生购买课程添加
    @PostMapping("/studentHave")
    Result<ConstantEnum> postHave(@RequestBody TbStudentHave studentHave);

}
